package com.qfedu.vo;


import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.io.Serializable;

@Data
@NoArgsConstructor
@ToString
public class ResultVo implements Serializable {
    private Integer code;

    private String msg;

    private Object data;


    private ResultVo(Integer code, String msg, Object data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }




    public static ResultVo getSuccessResultVo(String msg ,Object data){
        return  new ResultVo(0,msg,data);
    }

    public static ResultVo getFailResultVo(String msg ,Object data){
        return  new ResultVo(1,msg,data);
    }

    public static ResultVo getExceptionResultVo(String msg ,Object data){
        return  new ResultVo(2,msg,data);
    }

}
